home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Converters
/
Convert_PICT
/
Convert PICT.app
/
UncommentedPSCode
/
Ovals
< prev
next >
Wrap
Text File
|
1995-06-12
|
2KB
|
116 lines
%BEGIN Ovals
/ovalpath
{
/lastright exch def
/lastbottom exch def
/lastleft exch def
/lasttop exch def
newpath
lastright lastleft sub % compute width & height
lastbottom lasttop sub
lastbottom lastleft setupForArcPath
0 360 arc
closepath
} def
/frameOval
{
/lastright exch def
/lastbottom exch def
/lastleft exch def
/lasttop exch def
gsave
penPattern usePattern
/thewidth lastright lastleft sub def
/theheight lastbottom lasttop sub def
penHeight 1 eq
penWidth 1 eq
and
{
newpath
thewidth theheight lastbottom lastleft setupForArcPath
0 360 arc
closepath
stroke
}
{
penHeight 0 gt % don't draw with a 0 sized pen.
penWidth 0 gt
and
{
/startmatrix matrix currentmatrix def
newpath
thewidth theheight lastbottom lastleft setupForArcPath
0 360 arc
closepath
startmatrix setmatrix
/innerRight lastright penWidth sub 1 add def
/innerTop lasttop penHeight add 1 sub def
/innerLeft lastleft penWidth add 1 sub def
/innerBottom lastbottom penHeight sub 1 add def
/innerWidth innerRight innerLeft sub def
/innerHeight innerBottom innerTop sub def
innerWidth innerHeight innerBottom innerLeft
setupForArcPath
360 0 arcn
closepath
fill
}
if
}
ifelse
grestore
} def
/paintOval
{
gsave
penPattern usePattern
ovalpath
fill
grestore
}
def
/eraseOval
{
gsave
backPattern usePattern
ovalpath
fill
grestore
}
def
/invertOval
{
gsave
ovalpath
grestore
}
def
/fillOval
{
gsave
fillPattern usePattern
ovalpath
fill
grestore
}
def
/frameSameOval
{ lasttop lastleft lastbottom lastright frameOval }
def
/paintSameOval
{ lasttop lastleft lastbottom lastright paintOval }
def
/eraseSameOval
{ lasttop lastleft lastbottom lastright eraseOval }
def
/invertSameOval
{ lasttop lastleft lastbottom lastright invertOval }
def
/fillSameOval
{ lasttop lastleft lastbottom lastright fillOval }
def
%END Ovals